#!/usr/bin/python
# -*- utf-8 -*-

"""
This program demonstrates an about dialog box

example is from zetcode.com
"""

import wx

class Example(wx.Frame):

    def __init__(self, *args, **kwds):
        super(Example, self).__init__(*args, **kwds)
        self.InitUI()

    def InitUI(self):
        menubar = wx.MenuBar()
        help = wx.Menu()
        help.Append(100, '&About')
        self.Bind(wx.EVT_MENU, self.OnAboutBox, id=100)
        menubar.Append(help, '&Help')
        self.SetMenuBar(menubar)
        
        self.SetSize((200, 300))
        self.SetTitle("About dialog box")
        self.Center()
        self.Show(True)

    def OnAboutBox(self, e):
        description = """File Hunter is an advanced file manager for 
the Unix operating system. Features include powerful built-in editor, 
advanced search capabilities, powerful batch renaming, file comparison, 
extensive archive handling and more.
"""
        license = """File Hunter is free software; you can redistribute 
it and/or modify it under the terms of the GNU General Public License as 
published by the Free Software Foundation; either version 2 of the License, 
or (at your option) any later version.

File Hunter is distributed in the hope that it will be useful, 
but WITHOUT ANY WARRANTY; without even the implied warranty of 
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
See the GNU General Public License for more details. You should have 
received a copy of the GNU General Public License along with File Hunter; 
if not, write to the Free Software Foundation, Inc., 59 Temple Place, 
Suite 330, Boston, MA  02111-1307  USA"""
        about_info = wx.AboutDialogInfo()
        about_info.SetIcon(wx.Icon('hunter.jpg', wx.BITMAP_TYPE_JPEG))
        about_info.SetName('File hunter')
        about_info.SetVersion('1.0')
        about_info.SetDescription(description)
        about_info.SetCopyright('Hiya')
        about_info.SetWebSite('www.zetcode.com')
        about_info.SetLicense(license)
        about_info.AddDeveloper('Me')
        about_info.AddDocWriter('Me')
        about_info.AddArtist('Me')
        about_info.AddTranslator('Me')

        wx.AboutBox(about_info)

def main():
    ex = wx.App()
    Example(None)
    ex.MainLoop()

if __name__ == '__main__':
    main()
